﻿// <copyright file="Button.cs" company="ThorIndustry">Copyright (c) ThorIndustry. All rights reserved.</copyright>

public class PuzzleButton : Button
{
    public UnityEngine.GUITexture ButtonTexture;
    public UnityEngine.GUITexture BackgroundTexture;

    public override UnityEngine.GUITexture GuiTexture
    {
        get
        {
            return this.BackgroundTexture;
        }
    }

    public UnityEngine.GUITexture GuiTextureButton
    {
        get
        {
            return this.ButtonTexture;
        }
    }

    public override void Enable(bool enable)
    {
        if (this.IsEnable == enable)
        {
            return;
        }

        // base.Enable(enable);
        this.IsEnable = true;
        this.enabled = true;
    }

    protected override void ApplyStateTexture(ButtonTexture texture)
    {
        // base.ApplyStateTexture(texture);

        this.ButtonTexture.texture = texture.Texture;
        this.ButtonTexture.color = texture.Color;

        this.GuiTexture.color = texture.Color;
    }
}
